<%--
  Created by IntelliJ IDEA.
  User: 栋
  Date: 2022/12/6
  Time: 9:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <%@include file="/pages/base/base.jsp"%>
</head>
<body>
<div class="container">
    <%@include file="/pages/base/head.jsp"%>
    <%@include file="/pages/base/admin_nav.jsp"%>
    <div>

        <div class="errorMsg">
            ${ empty requestScope.msg ? "":requestScope.msg }
        </div>
        <c:if test="${sessionScope.shenHeItems!=null}">
            <table id="personalItems_tb">
                <tr>
                    <th>图片</th>
                    <th>商品编号</th>
                    <th>商品名称</th>
                    <th>商品类型</th>
                    <th>商品数量</th>
                    <th>商品单价</th>
                    <th>商品简介</th>
                    <th>交易方式</th>
                    <th>申请日期</th>
                    <th>申请时间</th>
                    <th colspan="2">审核商品</th>
                </tr>
                <c:forEach items="${sessionScope.shenHeItems}" var="item">
                    <tr>
                        <td><img src="${item.item_img}" width="100px" height="100px"></td>
                        <td>${item.item_id}</td>
                        <td>${item.item_name}</td>
                        <td>
                            <c:set var="t" scope="request" value="${item.item_type}"/>

                            <c:choose>
                                <c:when test="${t==1}">
                                    书籍
                                </c:when>
                                <c:when test="${t==2}">
                                    电子产品
                                </c:when>
                                <c:when test="${t==3}">
                                    生活用品
                                </c:when>
                                <c:when test="${t==4}">
                                    学习用品
                                </c:when>
                            </c:choose>
                        </td>
                        <td>${item.item_count}</td>
                        <td>${item.item_price}</td>
                        <td>${item.item_introduce}</td>
                        <td>${item.method}</td>
                        <td>${item.app_date}</td>
                        <td>${item.app_time}</td>
                        <td><a href="adminServlet?action=shenHeItem&item_id=${item.item_id}&option=1">合格</a></td>
                        <td><a href="adminServlet?action=shenHeItem&item_id=${item.item_id}&option=0">不合格</a></td>
                    </tr>
                </c:forEach>
            </table>
        </c:if>

    </div>
</div>
</body>
</html>
